home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / bbs / l2101a.zip / REFHELP.DOC < prev    next >
Text File  |  1997-06-24  |  28KB  |  690 lines

  1.  
  2.         *******  HOW TO MAKE YOUR OWN REF FILES FOR LORD II *******
  3.  
  4.                         For LORD II:New World V1.00
  5.                       (and I'm sorry these docs suck!)
  6.  
  7. Check 3rdparty.doc for more info.
  8.  
  9. The heart of this system is the .REF format.  It is a script language that
  10. can be used to do complex gaming things, like math and getting random
  11. numbers, adding and deleting other varibles in the game - nearly
  12. everything a simple basic could do.
  13.  
  14. REF is short for - Relay Execution File?  Reference File?  Who cares!
  15.  
  16. Although tricky at first, making a ref file is really pretty simple.  If
  17. something doesn't work, just go look at your .REF file, (a simple text
  18. file) and fix it!  The .ref language will tell you at runtime about
  19. words it doesn't understand or syntax errors.
  20.  
  21.  To see a demonstration of most commands, edit LORD II's .ref files.
  22.  
  23.  *  If a command isn't understood, it will tell you upon execution
  24.  *  .REF size is limited by conventional memory
  25.  *  REF files are completely loaded, and interpreted BEFORE execution for
  26.     speed
  27.  *  Allows BEGIN and END statements, thousands of levels deep
  28.  *  Ansi and SethAnsi (Sorry, don't have another name yet, <G> ) are
  29.     automatically displayed correctly locally and remotely
  30.  *  They can save and write their own data
  31.  
  32.                   ** Varibles the REF's use: **
  33.  
  34.  
  35. LOCAL : Will equal 5 if the ref is being viewed locally, otherwise 0.
  36. RESPONSE (or RESPONCE) : What @CHOICE returned.
  37.  
  38.     NOTE:  If the following are found in a string being displayed they
  39.            will be replaces with their values:
  40.  
  41. `V01 through `V40 These are the 40 GLOBAL longint varibles. (for numbers)
  42. `S01 through `S10 These are 10 GLOBAL string varibles. (for text)
  43. `P01 through `P99 These are the 99 player longint varibles. (for numbers)
  44. `T01 through `T99 these are 99 player byte varibles.  (255 max)
  45. `I01 through `I99 these are the 99 player integer item varibles. 32000 max)
  46. `+01 through `+99 - Same as above, but shows the item NAME, not amount.
  47.  
  48. `v05 and `p11 are reserved if you wish to use LORD2's 'limited movements'.
  49.  
  50. x  (players x cordinates)
  51. y  (players y cordinates)
  52. map (players current block #)
  53. dead (1 is player is dead)
  54. sexmale (1 if player is male)
  55. narm (current armour #)
  56. nwep (current weapon #)
  57. money (players moola)
  58. bank (moola in bank)
  59. enemy (force `e (last monster faught) to equal a certain name)
  60.  
  61. ALL The above can also be changed. Examples:
  62.  
  63. @do x is 20   <-sets X to 20
  64. @do `i05 is 90  <- Gives dude 90 item 5's (item is defined in l2cfg.exe)
  65.  
  66. These are symbols that will be translated automatically when using
  67. @show or @do write.  You can also make variables equal these, etc. Simular
  68. to Renegades MCI codes.
  69.  
  70. `N this is the users name.
  71. `E Enemy name.
  72. `G Current Graphics Level.
  73. `X Adds a space.
  74. `D Sends a #8 (delete).
  75. `0 through `9 and `! through `^ change color.
  76. `W One tenth a second wait.
  77. `L About a half second wait.
  78. `\ Simulates a carriage return.
  79. `r0 through `r7, change background color.
  80. `c Clears the screen and simulates 2 carriage returns.
  81.  
  82. &realname | Real name as passed by the drop file
  83. &date | The date and time like 12/12/97 format.
  84. &nicedate | Time AND date like 5:19 on 12/12.
  85. s&armour | equipped armour name.
  86. s&arm_num | equipped armour's defensive value
  87. s&weapon | equipped weapon name.
  88. s&wep_num | equipped weapon's attack value.
  89. s&son | son/daughter, depending on current users sex
  90. s&boy | boy/girl, depending on current users sex
  91. s&man | man/lady, depending on current users sex
  92. s&sir | sir/ma'am, depending on current users sex
  93. s&him | him/her, depending on current users sex
  94. s&his | his/her, depending on current users sex
  95. &money | current users gold
  96. &bank | current users gold in bank
  97. &lastx | users x position before last move.
  98. &lasty | users y position before last move - helpfull to determine which
  99.          direction they came from before the hit the ref, etc.
  100. &map | current map #
  101. &time | Current age of the game in days.
  102. &timeleft | Minutes the user has left in the door.
  103. &sex | returns 0 if player is female, 1 if player is male
  104. &playernum | The account # of the current player.
  105. &totalaccounts | How many player accounts exist. Includes accounts marked
  106.                  deleted.
  107. (NOTE: Vars starting with s& usually means if you can control the case
  108. of the first letter of the outpout by the case of the first s - so
  109. S&sir would return "Sir" and s&sir would return "sir")
  110.  
  111. (NOTE: These waits are the SAME on all computers, goes by the clock)
  112.  
  113. ***************** COMMAND LIST, A GOOD THING TO PRINT! *******************
  114.  
  115.  The newest ones are listed first.. I'll do those in lowercase, that upper
  116.  case is hard on the eyes kinda.
  117.  
  118. The following three commands are a new way to save and load data, it is
  119. much quicker than conventional @writefile and @loadfile, it saves as
  120. binary and not text.  It takes only 1004 bytes per file, tiny!  Extra room
  121. is allocated for upgrades and some info about the file.  I called them
  122. "IGM DATA FILES" or .IDF's.  Use this naming convention so Sysops know
  123. they should delete them when they reset..
  124.  
  125. @dataload <filename> <record (1 to 200)> <`p var to put it in> : This loads
  126. a longint by # from a datafile.  If the file doesn't exist, it is created
  127. and all 200 longints are set to 0.
  128.  
  129. @datasave <filename> <record (1 to 200)> <value to make it> : This SAVES
  130. a longint by # to a datafile.  If the file doesn't exist, it is created
  131. and all 200 longints are set to 0.
  132.  
  133. @datanewday <filename> :  If it is the NEXT day since this function was
  134. called, all #'s in <filename> will be set to 0.  Check EXAMPLE.REF for an
  135. example of how this works.  
  136.  
  137. @stripcode <any `s var> : This will remove ALL ` codes from a string.
  138. @drawpart <x> <y>: this will draw one char of a map screen with whatever
  139.                   it should be.  (including if people are there)
  140. @progname : The line UNDER this will be the status bar name of the game
  141. @moremap : The line UNDER this will be the new <more> prompt.
  142. @drawmap : This draws the current map the user is on.
  143. @update : Draws all the people on the screen.
  144. @update_update : Writes current player data to UPDATE.TMP file.  (if you
  145.                  can't wait until they are out of the ref file for some
  146.                  reason)
  147. @itemexit : Tells the item editor to automatically return the player to the
  148.             map screen after the item is used.  It is up to you to use the
  149.             @drawmap and @update commands as usual though.
  150. @busy : Makes the player appear 'red' to other players currently playing.
  151. @offmap : Makes the player appear to disappear to other players currently
  152.           playing.  (so it looks like they actually went into the hut)
  153. @pauseoff : You can show long ansis etc and it won't do its usuall every
  154.             24 line pause.
  155. @pauseon : Turns pause back on.
  156.  
  157. @do `v01 is 1 : Sets the default option on the next lightbar selection,
  158.              ALWAYS use before a @choice command.
  159. @moveback : Use this to move the player back to where he moved from - good
  160.             for when they push against a treasure chest or such, and you
  161.             don't want them to appear inside of it when they are done.
  162. @do addlog : The line UNDER this command is added to the 'lognow.txt' file.
  163. @loadworld : Loads globals and world data - has never been used, but is
  164.              included just in case.
  165. @saveworld : Saves stats and world data - only use yet is in right after
  166.              @#maint is called to save random stats set for that day and
  167.              such.
  168. @loadmap <map #> : Very handy - Lets you change someones map location in
  169.                    a ref file.  This is the 'block #' not the physical map
  170.                    location, so it could be 1 to 1600.  (make sure it exist
  171.                    in l2cfg.exe though) Be SURE to change the map variable
  172.                    too!!  Using this and changing the X and Y
  173.                    cords effectivly lets you do a 'warp' from a .ref file.
  174.  
  175. @statbar | Draws the statbar.
  176. @clearblock <start y> <end y> | Clears lines quick - @clear block 20 24 would
  177.                                 clear 4 lines starting at 20
  178.  
  179. @bitset <`t01 to `t99> <bit> <0 or 1> | Sets a certain bit in a byte var, lets
  180. you have 8 yes/no vars in one `t byte var! Examp: @bitset `t12 1 1 (this
  181. turns bit 1 in `t12 to ON) (bits can be from 0 to 7)
  182.  
  183. Now of course you'll want to check sometimes to see if a bit is yes or no...
  184.  
  185. @if bitcheck `t12 1 1 then do
  186.   @begin
  187.   @show
  188.   Yeah!  Bit 1 of t12 is TRUE!!! Yay.
  189.   @end
  190.  
  191. It works like a standard @IF after the 'then' part.
  192.  
  193. ALSO:  Check the CHOICE command, you can check a bit there too, like this:
  194. +`t12 1 Hey, byte 12 bit 1 is TRUE!
  195.  
  196. Use '-' for false.
  197.  
  198. @quebar
  199. <message>
  200.  
  201. The above will add a message to the saybar que - This means if the game
  202. is currently displaying a message, or has a few to display, it will wait
  203. until the proper time.
  204.  
  205. @saybar
  206. <message>
  207.  
  208. The above is like quebar, except it displays the message instantly,
  209. without taking into consideration that a message might have just been
  210. displayed and this will write over it.
  211.  
  212. @chooseplayer `p20 | Will prompt user for another players name - its the
  213.                       standard 'full or partial name' thing, with a 'you mean
  214.                       this guy?'.  It returns the players # or 0 if none.
  215.  
  216. -=-=-= Stuff to get info from OTHER players in the game, assuming you
  217.        know their player #...
  218.  
  219. @do `s01 is getname 8 | Would get the name of player 8 and put it in `s01.
  220.                      (only works with `s vars)
  221. @do `p20 is deleted 8 | Puts 1 (yes) or 0 (no) in `p20.
  222.                      (only works with `p vars)
  223.  
  224. @DO GOTO <header or LABEL name>
  225. @NOCHECK : This makes it not scan for labels/headers before running it.
  226. @ROUTINE <Header or label name> IN <Filename of .REF file> (only one parm is
  227.           given, it assumes it is in the current .ref)
  228. @ROUTINEABORT : Stops it from returning.
  229. @RUN <Header or label name> IN <Filename of .REF file>
  230. @CHOICE
  231. @VERSION  <Version it needs>
  232. @SHOW  : Shows following text/ansi.  Stops when a @ is hit on
  233. @SHOW SCROLL : Same thing, but puts all the text in a nifty scroll window
  234. @REPLACE <this> <that> <in this> : Replaces this with that in an `s var.
  235. @REPLACEALL <this> <that> <in this> : Same as above but replaces all instances
  236. @DO WRITE
  237. @DO BEEP :  Makes a weird beep noise, locally only
  238. @DISPLAYFILE <filename> <options> : This display an entire file.  Possible
  239.                                 options are:  NOPAUSE and NOSKIP.
  240. @DISPLAY <this> IN <this file> <options> : This is used to display a certain
  241. part of a file, compatible with the LORDTXT.DAT format.
  242. @IF <Varible> <Math> <Varible> (Math can be MORE, LESS, NOT, IS)
  243. @GRAPHICS IS <Num> :  3 or more enable remote ANSI.  If you never wanted
  244. @CLOSESCRIPT : This ends the script.
  245. @CLEAR SCREEN: Clears entire screen.
  246. @KEY : Does a [MORE] prompt, centered on current line.
  247. @KEY NODISPLAY : Waits for keypress without saying anything.
  248. @DO <Var To Change> <How To Change It> <Change With What>
  249. Ways to change it:(-,+,/,*,IS)
  250. @DO <Varible to put # in> RANDOM <Highest random number> <number added to it>
  251. @DO MOVE <X> <Y> : This moves the curser.  (like GOTOXY in TP) Enter 0 for
  252. @DO GETCHAR <String var to put it in> Grabs a keypress, with timeslicing.
  253. @DO READSPECIAL <String var to put it in> <legal chars, 1st is default>
  254. @DO GETKEY <String var to put it in> : This command is usefull, *IF* a key
  255. @DO READNUM <MAX LENGTH> (Optional: <FOREGROUND COLOR> <BACKGROUND COLOR>
  256. <DEFAULT>: The number is put into `V40.
  257. @DO READSTRING <MAX LENGTH> <DEFAULT> <VAR TO PUT IT IN> : Get a string.
  258. @DO STRIPBAD: Strips out illegal ` codes, and replaces badwords with
  259.               the standard badword.dat file.
  260. @DO STRIPALL: Strips out all ` codes.  Good for passwords, etc.
  261. @DO COPY TO NAME  Put whatever is in `S10 into `N.  (name)
  262. @IF <Word or var> INSIDE <Word or var> THEN (ect) :  Allows you to search
  263. a string for something inside of it.  Not case sensitive.
  264. @DO STRIP <string var> : This strips beginning and end spaces of a string.
  265. @DO UPCASE <string var> : Makes a string all capitals.
  266. @DO <num var> IS LENGTH <String var>  : Gets length, smart way.
  267. @DO <num var> IS REALLENGTH <String var>  : Gets length dumb way. (includes
  268. @DO PAD <string var> <length> :  Adds spaces to end until string is as long
  269.                                  as <length>.
  270. @IF <name of file> EXISTS TRUE THEN (..ect..)
  271. @IF <name of file> EXISTS FALSE THEN (..ect..)
  272. @WRITEFILE <file name>
  273. <Thing to write>
  274. <Thing to write>
  275. <ect until next @ at beginning of string is hit>
  276. @READFILE <file name>
  277. <Var to read into>
  278. <Var to read into>
  279. <Ect until next @ at beginning of string is hit>
  280. @DO DELETE <file name>  : Delete a file.
  281. @COPYFILE <input filename> <output filename> : Copies a file.  Not that
  282. hard to use, really.          
  283. @CONVERT_FILE_TO_ANSI <input file> <output file> : Converts a text file
  284. of Sethansi (whatever) to regular ansi.  Good for a final score output.
  285. @CONVERT_FILE_TO_ASCII <input file> <output file> : Converts a text file
  286. of Sethansi (whatever) to regular ascii, ie, no colors at all.
  287. @DO TRIM <file name> <number to trim to> :  Trims text file
  288. @HALT <error level> : Quits and returns correct error level.
  289. @SHELL <.EXE, BAT or COM> <Parms, up to 8> (note, use `* for node num)
  290. @DECLARE <Label/header name> <offset in decimal format>
  291.  
  292. ************** NOW TO GO INTO MORE DETAIL ON EACH COMMAND******************
  293.  
  294.                       ** About headers **
  295.  
  296. Some may be familiar with the way the door LORD keeps track of it's many
  297. ansi's and other display files.  It gives each one a HEADER.  Any header
  298. can be reached with a @DO GOTO <header name> command.
  299.  
  300. Example header:
  301.  
  302. @#START
  303.  
  304.  
  305. This MUST be in a ref file, this is where RTREADER will start.  Anytime
  306. you wish to return to the start, just do a:
  307. @DO GOTO START
  308. command.
  309.  
  310.                       ** Another kind of header **
  311.  
  312. Anytime RTREADER hit's a @#, it knows another section is starting, and
  313. quits.  If you would like to use goto commands INSIDE of a 'section', use
  314. the @LABEL command.  They work like headers, but don't cause a section to
  315. 'quit'.
  316.  
  317. Example:
  318.  
  319. @LABEL LOOP
  320.  
  321. @DO GOTO LOOP
  322.  
  323. You can have as many headers/labels as you want, however, the first 300
  324. 'headers' and 'labels' will be INSTANT access, anything past will not be
  325. quite as quick.
  326.  
  327. This 'speed up' routine runs by default on all .REF files.  (Processes the
  328. labels and headers before running)
  329.  
  330. This takes a noticable pause when doing so, so you may wish to disable this
  331. feature.  Add a
  332.  
  333. @NOCHECK
  334.  
  335. Somewhere near the beginning, it won't check past that point.
  336.  
  337. Also, the Reader is now capable of mapping labels/headers on the fly if it
  338. runs across one that isn't - So the SECOND time you run GOTO it, it's
  339. instantanous.  (this is always active)
  340.  
  341. @DECLARE <Label/header name> <offset in decimal format>
  342.  
  343. This statement allows you to declare a label, and where it is.  Don't
  344. use this unless you know what you are doing - I was thinking I could make
  345. a SPEEDREF.EXE that simply maps out all the headers and makes them all
  346. @DECLARE statements, followed by a @NOCHECK and puts them in the beginning.
  347.  
  348. This would be tricky because every time you add something, the offset
  349. changes...
  350.  
  351.  
  352. NOTE:  Headers like all other commands in RTREADER are *NOT* case
  353.        sensitive.  You can type the whole thing in lowercase, or uppercase
  354.        - or mixed.  It just don't matter man.
  355.  
  356.  
  357.                       ** Basic command list: **
  358.  
  359.  
  360. @GRAPHICS IS <Num> :  3 or more enable remote ANSI.  If you never wanted
  361.                       to send ANSI, you could set this to 1. You will
  362.                       probably never touch this one.
  363.  
  364. @ROUTINE <Header or label name> IN <Filename of .REF file>
  365.  
  366. The @ROUTINE command is usefull - You can use it jump to a completely new
  367. .REF file - when it's finished there, instead of dropping to DOS, it will
  368. load back up the original .REF file and continue where it left off.
  369.  
  370. @RUN <Header or label name> IN <Filename of .REF file>
  371.  
  372. Same thing as above, but doesn't come back to the original .REF.
  373.  
  374. @CHOICE
  375. <A choice>
  376. <another choice>
  377. <ect..When a @ is found in the beginning of a choice it quits>
  378.  
  379. This gives the user a choice.
  380.  
  381. The responce is put into varible RESPONCE.  To set which choice the curser
  382. starts on, put that number into `V01.
  383.  
  384. ** EXAMPLE OF @CHOICE COMMAND **
  385.  
  386. @DO `V01 IS 1 ;which choice should be highlighted when they start
  387.  
  388. (now the choice part)
  389.  
  390. @CHOICE
  391. Yes   <- Defaults to this, since it's 1
  392. No
  393. I don't know
  394. Who cares
  395. @IF RESPONCE IS 3 THEN DO
  396.   @BEGIN
  397.   @DO `P01 IS RESPONCE
  398.   @SHOW
  399.  
  400. You chose `P01!, silly boy!
  401.  
  402.   @END
  403.  
  404. The choice command is more usefull now; you can now define *IF* type
  405. statements so a certain choice will only be there if a conditional statement
  406. is met.
  407.  
  408.  
  409. For instance:
  410.  
  411. @CHOICE
  412. Yes
  413. No
  414. =`p20 500 Hey, I have 500 exactly!
  415. !`p20 500 Hey, I have anything BUT 500 exactly!
  416. >`p20 500 Hey, I have MORE than 500!
  417. <`p20 100 Hey, I have LESS than 100!
  418. >`p20 100 <`p20 500 I have more then 100 and less than 500!
  419.  
  420. Also:  If you are using bitchecking with `t (byte) vars, you can have a if
  421. bit is true or false, like this:
  422.  
  423. +`t12 1 Hey! Byte 12's bit 1 is TRUE! (which is 1)
  424. -`t12 3 Hey! Byte 12's bit 3 is FALSE! (which is 0)
  425.  
  426. The = > and < commands can be stacked as needed.  If `p20 was 600, only
  427. option 2 would be available, and RESPONSE would be 2 after the user hit it.
  428.  
  429. IMPORTANT NOTE:  Never have spaces AFTER lines under a choice command.. This
  430. can make options not show up, etc... still working on why..
  431.  
  432. @VERSION  <Version it needs>  : For instance, you would put
  433.           @VERSION 2 for this version of RTREADER.  (002) If it is run
  434.           on Version 1, (could happen) a window will pop up warning the
  435.           person he had better get the latest version.
  436.  
  437. @SHOW           : Shows following text/ansi.  Stops when a @ is hit on
  438.                   beginning of line.
  439.  
  440. @SHOW SCROLL          : Same thing, but puts all the text in a nifty scroll
  441.                         window. (scroll window has commands line Next Screen,
  442.                         Previous Screen, Start, End and eXtract to file.
  443.                         (that last one is only shown and executed locally)
  444.  
  445. @DO WRITE
  446. <Stuff to write>
  447.  
  448. Same thing as regular @SHOW, but does only one line, without a
  449. line feed.  Used with @DO MOVE this is good for putting prompts,
  450. right in front of READNUM and READSTRING's.
  451.  
  452. NOTE:  You can use Vars mixed with text, ansi and color codes in the
  453. <stuff to write> part.  Works this way with most stuff.
  454.  
  455. @DISPLAYFILE <filename> <options> : This display an entire file.  Possible
  456.                                 options are:  NOPAUSE and NOSKIP.  Put a
  457.                                 space between options if you use both.
  458.  
  459. @IF <Varible> <Math> <Thing the varible must be, or more or less then, or
  460. another varible>  (Possible math functions: EQUALS, MORE, LESS, NOT)
  461.  
  462.  
  463. @CLOSESCRIPT : This ends the script.
  464. @CLEAR SCREEN: Clears entire screen.
  465. @KEY : Does a [MORE] prompt, centered on current line.
  466. @KEY NODISPLAY : Waits for keypress without saying anything.
  467.  
  468. @DO : This statement does a lot - It can be put a the end of a @IF statement
  469.       also.  (Some commands need @DO in front, some don't.  If they do, they
  470.       can be used at the end of an @IF statement, if not, you can't.  (like
  471.       @SHOW)  You would need to use the @BEGIN and @END with the @IF to do
  472.       it conditionally.
  473.  
  474. EXAMPLES OF @DO:
  475.  
  476. Possible DO math symbols are:
  477.  
  478. @DO <Number To Change> <How To Change It> <Change With What>
  479.  
  480. Ways to change it:
  481.  
  482. - <- Take number away
  483. + <- Addition
  484. / <- Division
  485. * <- Multiplication
  486. IS <- Makes same as
  487.  
  488. NOTE:  You can also do this with `S (string vars) but you are limited to
  489. only using IS.  (no math can be done with strings) (See the string section)
  490.  
  491. @IF `V04 MORE 500 THEN DO `V04 - 500
  492. (This would take 500 from `V04 if they had it)
  493. (+ would add money, IS would MAKE it 500)
  494. @IF `V04 MORE 500 THEN DO
  495.  @BEGIN
  496.  @SHOW
  497.  `2You have more then 500!  In fact you have `V04!
  498.  @END
  499.  (if @BEGIN is followed by a @DO it will be executed, otherwise skipped)
  500.  (In @DO WRITE, @SAY and @SHOW (Except SHOW SCROLL) it will print the `V,
  501.   `P and `S varibles - It also understands:
  502.  `N (user name)
  503.  `* (node number)
  504.  
  505. @DO <Varible to put # in> RANDOM <Highest random number> <number to add to it>
  506.  
  507. This is how you generate random numbers.  To generate a number between 500 and
  508. 1000 and put it in varible `P05 you would put:
  509.  
  510. @DO `P05 RANDOM 500 500
  511.  
  512. @DO MOVE <X> <Y> : This moves the curser.  (like GOTOXY in TP) Enter 0 for
  513.                    a number will default to 'current location'.
  514.  
  515.  
  516.                **** STRING AND FILE COMMANDS ****
  517.  
  518. @DO READCHAR <string var to put it in> -Waits for a key to be pressed, uses
  519. DV and windows time slicing while waiting.
  520.  
  521. @DO READSPECIAL (String var to put it in> <legal chars, 1st is default>
  522. Example:
  523.  
  524. @do write
  525. Would you like to kill the monster? Y/N :
  526. @DO READSPECIAL `s01 YN
  527. if `s01 is Y then do
  528.  @begin
  529.  @show
  530. You killed him!
  531.  @end
  532.  
  533. The above would ONLY allow the person to hit Y or N - if he hit ENTER, it
  534. would be the same as hitting Y, because that was listed first.  
  535.  
  536. @DO GETKEY <String var to put it in> : This command is usefull, *IF* a key
  537.                                        IS CURRENTLY being pressed, it puts
  538.                                        that key into the string var.
  539.                                        Otherwise, it puts a '_' in to signal
  540.                                        no key was pressed.
  541.  
  542.                                        Good way to stop a loop.
  543.  
  544. @DO READNUM <MAX LENGTH> (Optional: <FOREGROUND COLOR> <BACKGROUND COLOR>
  545. <DEFAULT>: The number is put into `V40.
  546.  
  547. The READNUM procedure is a very nice string editer to get a number in. It
  548. supports arrow keys and such.
  549.  
  550. @DO READSTRING <MAX LENGTH> <DEFAULT> <VAR TO PUT IT IN> : Get a string.
  551. Uses same string editer as READNUM.
  552.  
  553. Note:  You can only use the `S01 through `S10 vars for READSTRING.  You
  554. can also use these vars for the default.  (or `N)  Use NIL if you want
  555. the default to be nothing.  (if no Var to put it in is specified, it will
  556. be put into `S10 for compatibilty with old .REF's)
  557.  
  558. @DO COPY TO NAME  Put whatever is in `S10 into `N.  (name)
  559.  
  560. To make a string EQUAL something, you would do it like this:
  561. @DO `S04 IS Hello I am
  562. (OR)
  563. @DO `S04 ADD A programmer
  564. (OR)
  565.  
  566. @DO `S04 IS `S02 <- Would copy `S02 to `S04.
  567.  
  568. Note:  There you can only have three spaces per string defination.
  569.        Use the ADD to make a long string.  OR use `X to make spaces, this
  570.        way you can have many spaces in one @DO.
  571.  
  572.  
  573. @IF <Word or var> INSIDE <Word or var> THEN (ect) :  Allows you to search
  574. a string for something inside of it.  Not case sensitive.
  575.  
  576. @DO STRIP <string var> : This strips beginning and end spaces of a string.
  577. @DO UPCASE <string var> : Makes a string all capitals.
  578. @DO <num var> IS LENGTH <String var>  : Gets length, smart way.
  579. @DO <num var> IS REALLENGTH <String var>  : Gets length dumb way. (includes
  580.                                             '`' codes without deciphering
  581.                                             them.)
  582.  
  583.  
  584. @DO PAD <string var> <length> :  Adds spaces to end until string is as long
  585.                                  as <length>.
  586.  
  587. NOTE:  Pad automatically does not include color codes in the length, and DOES
  588.        include varibles in the length.  (like if there was a `s02 inside the
  589.        string)  (my God.. If you were displaying `s01 and it had a `s01 in
  590.                 it, wouldn't it display forever?  I'll have to check that.)
  591.        (note from 3 years later.. still haven't checked into that..maybe
  592.        next year..)
  593.  
  594. @IF <name of file> EXISTS TRUE THEN (..ect..)
  595. @IF <name of file> EXISTS FALSE THEN (..ect..)
  596.  
  597. NOTE:  The above "name of file" can be a var, num or string, or even mixed.
  598.        If if not stated, most commands are capable of this.
  599.  
  600. @WRITEFILE <file name>
  601. <Thing to write>
  602. <Thing to write>
  603. <ect until next @ at beginning of string is hit>
  604.  
  605. <Thing to write> can be a varible, (string or num) or it can be a word you
  606.  write - or a combination of the two.
  607.  
  608. Note:  @WRITEFILE appends the lines if the file exists, otherwise it
  609.        creates it.  File locking techniques are used.
  610.  
  611. @READFILE <file name>
  612. <Var to read into>
  613. <Var to read into>
  614. <Ect until next @ at beginning of string is hit>
  615.  
  616. This works just like @WRITEFILE.  You can use String and Number vars, just
  617. be warned if a number var attempts to read a string, you will always get
  618. 0.
  619.  
  620. NOTE:  @READFILE is a smart procedure - It will not run-time error or
  621.        anything, even if you try to read past the end of the file. It
  622.        simply won't change the vars if the file isn't long enough.
  623.  
  624. @DO DELETE <file name>  : Both delete a file.
  625.  
  626. @DO TRIM <file name> <number to trim to> :  This nifty command makes text
  627.                                             file larger than <number to trim
  628.                                             to> get smaller.  (it deletes
  629.                                             lines from the top until file
  630.                                             is correct # of lines, if smaller
  631.                                             than num, it doesn't change the
  632.                                             file)
  633.  
  634. Note:  On *ALL* of these file commands, you cannot give a path.  A path
  635.        will be put in the beginning, so file commands can only be used in
  636.        the current dir.
  637.  
  638.  
  639.  
  640.                    ****** SPECIAL TALKING COMMANDS ******
  641.  
  642.       These commands are tricky to use, they are used in RTNEWS02.REF,
  643.       (the talking to Seth part) but most people probably don't want to
  644.       hassle with getting the pics in the exact right spot for everything
  645.       to look right.  (it's a New World thing)
  646.  
  647.  
  648. @SAY : All text UNDER this will be put in the 'talk window' until a @ is
  649. hit.
  650. @KEY TOP : Does <MORE> prompt at game text window.
  651. @KEY BOTTOM : Does <MORE> prompt at user text window.
  652. @CLEAR NAME : Deletes the name line of the game window.
  653. @CLEAR USERSCREEN: Clears user text.
  654. @CLEAR TEXT: Clears game text.
  655. @CLEAR PICTURE: Clears pic.
  656. @CLEAR ALL : Clears user text, pic, game text, name and redraws screen.
  657.  
  658.                  ****** THE SHELL COMMAND ******
  659.  
  660. NOTE:  THIS FEATURE DOES NOT WORK IN LORD II AT THIS TIME.
  661.  
  662. A powerful feature of RTREADER is the ability to run OTHER programs inside
  663. of it, and return to the exact spot it left automatically.
  664.  
  665. @SHELL <.EXE, BAT or COM> <Parms, up to 8> (note, use `* for node num)
  666.  
  667. When this happens, two files are created.
  668.  
  669. DO<node num>.BAT is created.  This is actually the file that is run.
  670.  
  671. INFO.<node num> is created.  Simular to LORD's INFO.? system.
  672.  
  673. This text file contains the following:
  674.  
  675. Users first name
  676. Users Last Name
  677. Ref file it was reading before shelling
  678. Offset of ref file (where it was when it shelled)
  679. Graphics <- Passed from drop file, usually between 2 and 5.
  680. Time Left
  681. Com Port
  682. Baud Rate
  683. Lockbaud
  684. FOSSIL (or INTERNAL or DIGI)
  685.  
  686. Note:  The procedure RTREADER uses upon 're-entry' is it reads the proper
  687.        NODE<node num>.DAT file, *THEN* it reads the INFO.? file and fills
  688.        in the gaps.  It does read the Time Left back in also.
  689.  
  690.